﻿//---*Authenticity Seal
/*			                                _ .--.
					                       ( `    )
									     .-'      `--,
			                  _..----.. (             )`-.
			                .'_|` _|` _|(  .__,           )
						   /_|  _|  _|  _(        (_,  .-'
			              ;|  _|  _|  _|  '-'__,--'`--'
			              | _|  _|  _|  _| |
			          _   ||  _|  _|  _|  _|
			        _( `--.\_|  _|  _|  _|/
			      .-'       )--,|  _|  _|.`
				(__, (_      ) )_|  _| /
			      `-.__.\ _,--'\|__|__/
			                    ;____;
			                     \  /
								  OO
			                     |""|
			                     '=='
			                     
           			 Autor: Federico Angel Donnet
*/
//---*Authenticity Seal
//---*Setea el SortingLayer indicado:
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class SetSortingLayer : MonoBehaviour
{

	//----------------//
	//---*Atributos:
	//----------------//
	//---*El SortingLayer que queremos setear:
	public	string	sortingLayerName		=	"None";


	//----------------//
	//---*Metodos:
	//----------------//
	// Use this for initialization
	void Start () 
	{
		//---*Si se trata de un Emisor de Particulas:
		if(this.particleSystem != null)
		{
			this.particleSystem.renderer.sortingLayerName	=	this.sortingLayerName;
		}
		//---*De lo contrario:
		else 
		{
			this.gameObject.renderer.sortingLayerName		=	this.sortingLayerName;
		}
	}

}
